Release 10.1A: OpenEdge Data Management:
Database Administration


Copying a database using PROCOPY

Use the PROCOPY utility to copy an existing database. For example, to copy the Sports2000 database to a database named mysports2000, enter the following:

procopy Sports2000 mysports2000 

PROCOPY supports storage areas. Therefore, if a target database exists, it must contain at a minimum the same type and number of storage areas and same extent types as the source database. However, the number of extents in the storage areas of the target database do not need to match the number of extents in the source database. PROCOPY attempts to extend the existing extents in the target database to accommodate the possible increase in size.

If a target database does not exist, PROCOPY creates one using an existing structure description (.st) file in the target database directory. If a .st file does not exist, PROCOPY creates the target database using the structure of the source database and places all of the extents in the same directory as the target database structure (.db) file, even when the source database resides in multiple directories.

PROCOPY uses absolute pathnames

When you use the PROCOPY utility, the target database you create always has an absolute pathname regardless of the pathname convention used by the source database.

For example, if you use PROCOPY to create a database, name it example1, and use a relative path database such as sports2000 as the source database, example1 will have an absolute pathname even though the source database, sports2000, uses a relative pathname. Use PROSTRCT LIST to verify the absolute pathname of your target database. For example:

procopy sports2000 example1 
prostrct list example1 

In the following sample output of the PROSTRCT LIST utility, note the absolute pathname of the database, example1.db:

Area Name: Control Area, Type 6, BlockSize 4096, Extents 1, Records/Block32, 
Cluster Size 1 
   Ext # 1, Type VARIABLE, Size 32 KByte, Name: /usr1/V10/example1.db 
Area Name: Primary Recovery Area, Type 3, BlockSize 8192, Extents 1 
   Ext # 1, Type VARIABLE, Size 2176, Name: /usr1/V10/example1.b1 
Area Name: Schema Area, Type 6, BlockSize 4096, Extents 1, Records/Block 32, 
Cluster Size 1 
   Ext # 1, Type VARIABLE, Size 960 KByte, Name: /usr1/V10/example1.d1 
Area Name: Info, Type 6, BlockSize 4096, Extents 1, Records/Block 32, Cluster 
Size 1 
   Ext #1, Type VARIABLE, Size 192 KByte, Name: /usr1/V10/example1_7.d1 
Area Name: Order, Type 6, BlockSize 1024, Extents 2, Records/Block 32, Cluster 
Size 1 
   Ext # 1, Type FIXED   , Size 1280, Name: /usr1/V10/example1_8.d1 
   Ext # 2, Type VARIABLE, Size 0, Name: /usr1/V10/example1_8.d2 


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095